<template>
    <nut-tabs v-model="active"
              color="#e222ff"
              align="left"
              size="small">
        <nut-tab-pane v-for="(tab, index) in tabs"
                      :key="index"
                      :title="tab.title"
                      :pane-key="tab.id">
            <div style="padding:15px;background-color: #3f3f3f;">
                <template v-for="(fItem, index) in 10" :key="index">
                    <div class="flow-game-item">
                        <div class="bl">
                            <img src="../../../assets/fllow.webp" alt="" class="user-avatar">
                            <span class="liked"></span>
                        </div>
                        <div class="bc">
                            <p style="color: #a7a7a7;font-size: 12px;"> SLUTS</p>
                            <p style="color: #4cb4fc;font-size: 12px;text-decoration: underline;">
                                前往游戏讨论版
                            </p>
                        </div>
                        <div class="br">
                            <div class="btn">
                                下载
                            </div>
                        </div>
                    </div>
                </template>
            </div>
        </nut-tab-pane>
    </nut-tabs>
</template>

<script setup lang="ts">
import { ref } from 'vue'

const tabs = [
    { id: 1, title: '全部' },
    { id: 2, title: '一天前' },
    { id: 3, title: '三天前' },
    { id: 4, title: '一周前' }
]
const active = ref(1)
</script>

<style scoped lang="scss">
:deep(.nut-tab-pane) {
        padding: 0;
        background: transparent;
}

.flow-game-item {
    background-color: #2f2f2f;
    border-radius: 30px;
    display: flex;
    margin: 0 20px;
    padding-right: 20px;
    margin-bottom: 20px;


    .bl {
        width: 60px;
        height: 60px;
        flex-grow: 0;
        position: relative;
        .liked{
            display: inline-block;
            position: absolute;
            left: -0;
            top:-2px;
            width: 20px;
            height: 20px;
            background: url('../../../assets/liked.png') no-repeat center;
            background-size: contain;
        }

        img {
            width: 100%;
            height: 100%;
        }
    }

    .bc {
        flex-grow: 1;
        padding-left: 10px;
    }

    .br {
        width: 73px;
        flex-grow: 0;
        display: flex;
        align-items: center;
        .btn {
            font-size: 12px;
            width: 73.5px;
            height: 22px;
            line-height: 22px;
            text-align: center;
            object-fit: contain;
            border-radius: 11px;
            background-color: #ea49a7;
        }
    }

}
</style>
